package cn.fan.redis;

import cn.fan.constants.RedisConstants;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Component;

@Component
public class TokenRedis {

    @Cacheable(value = RedisConstants.JWT_CACHE_KEY,key = "#userId")
    public String getById(String userId){
        return null;
    }

    @CachePut(value = RedisConstants.JWT_CACHE_KEY,key = "#userId")
    public String putById(String userId,String key){
        return key;
    }

    @CacheEvict(value = RedisConstants.JWT_CACHE_KEY,key = "#userId")
    public void moveById(String userId){

    }
}
